package service

import (
	"context"
	"mall-portalv2/internal/model"
)

func (s *Service) QueryPmsProductFullInfo(ctx context.Context, ids []int64) ([]model.ViewProductFull, error) {
	result, err := s.dao.QueryPmsProductFullInfo(ctx, ids)
	if err != nil {
		return []model.ViewProductFull{}, err
	}
	return result, err
}

func (s *Service) UpdateProductAndCrowdFunding(ctx context.Context, ProductId, ProductSkuId, CrowdFundingId, CrowdFundingSkuId, OrderId, MemberId int64) error {
	if err := s.dao.UpdateProductAndCrowdFunding(ctx, ProductId, ProductSkuId, CrowdFundingId, CrowdFundingSkuId, OrderId, MemberId); err != nil {
		return err
	}
	return nil
}
